package com.ftg.youx.util;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * mq配置类
 *
 * @author 布衣
 */
@Configuration
@EnableRabbit
public class RabbitMqUtil {

    /**
     * 创建队列
     */
    @Bean
    public Queue initQueue(){
        return new Queue("queue01");
    }
    //发布订阅者模式如何

    //路由模式如何编写？

}
